subroutine F_openfiles(pdb,xtc,n)
  use iso_c_binding, only: c_char,c_int,c_null_char
  implicit none
  character(len=140) :: pdb,xtc
  integer :: n

  interface
     subroutine C_openfiles(pdb,xtc,n) bind(C, name="openFiles")
       use iso_c_binding, only: c_char,c_int
       character(kind=c_char) :: pdb(*),xtc(*)
       integer(kind=c_int) :: n
     end subroutine C_openfiles
  end interface
  character(kind=c_char,len=141) :: mypdb,myxtc
  integer(kind=c_int) :: n0
  mypdb=pdb//c_null_char;myxtc=xtc//c_null_char

  call C_openfiles(mypdb,myxtc,n0)
  n=n0;
end subroutine F_openfiles
